home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / include / user / RCS / cfuncproto.h,v < prev    next >
Encoding:
Text File  |  1992-07-17  |  3.3 KB  |  163 lines

  1. head     1.4;
  2. branch   ;
  3. access   ;
  4. symbols  srv030:1.4 srv027:1.4 srv026:1.4 srv024:1.4 srv021:1.4 srv019:1.4 srv018:1.4 srv016:1.4 srv014:1.4 srv010:1.4 srv008:1.4 srv007:1.4 srv006:1.4 srv005:1.4 srv004:1.4 srv003:1.4 srv002:1.4 srv001:1.4;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.4
  10. date     91.12.12.22.27.01;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.3;
  13.  
  14. 1.3
  15. date     91.12.01.22.19.30;  author kupfer;  state Exp;
  16. branches ;
  17. next     1.2;
  18.  
  19. 1.2
  20. date     91.10.07.14.18.40;  author kupfer;  state Exp;
  21. branches ;
  22. next     1.1;
  23.  
  24. 1.1
  25. date     91.10.06.23.58.34;  author kupfer;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @@
  32.  
  33.  
  34. 1.4
  35. log
  36. @Lint doesn't understand void pointers, either.
  37. @
  38. text
  39. @/*
  40.  * cfuncproto.h --
  41.  *
  42.  *    Declarations of a macro supporting Ansi-C function prototypes in
  43.  *    Sprite. This macro allow function prototypes to be defined 
  44.  *    such that the code works on both standard and K&R C.
  45.  *
  46.  * Copyright 1990 Regents of the University of California
  47.  * Permission to use, copy, modify, and distribute this
  48.  * software and its documentation for any purpose and without
  49.  * fee is hereby granted, provided that the above copyright
  50.  * notice appear in all copies.  The University of California
  51.  * makes no representations about the suitability of this
  52.  * software for any purpose.  It is provided "as is" without
  53.  * express or implied warranty.
  54.  *
  55.  * $Header: /r3/kupfer/spriteserver/include/user/RCS/cfuncproto.h,v 1.3 91/12/01 22:19:30 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  56.  */
  57.  
  58. #ifndef _CFUNCPROTO
  59. #define _CFUNCPROTO
  60.  
  61. /*
  62.  * Definition of the _ARGS_ macro.  The _ARGS_ macro such be used to 
  63.  * enclose the argument list of a function prototype.  For example, the
  64.  * function:
  65.  * extern int main(argc, argv)
  66.  *    int args;
  67.  *     char **argv;
  68.  *
  69.  * Would have a prototype of:
  70.  *
  71.  * extern int main _ARGS_((int argc, char **argv))
  72.  *
  73.  * Currently the macro uses the arguments only when compiling the
  74.  * KERNEL or Sprite server with a standard C compiler.
  75.  */
  76.  
  77. #ifndef _ASM
  78.  
  79. #if (defined(KERNEL) || defined(SPRITED)) && defined(__STDC__)
  80. #define _HAS_PROTOTYPES
  81. #define _HAS_VOIDPTR
  82. #endif
  83.  
  84. #ifdef lint
  85. #undef _HAS_CONST
  86. #undef _HAS_VOIDPTR
  87. #endif
  88.  
  89. #if defined(__cplusplus)
  90. #define _EXTERN         extern "C"
  91. #define _NULLARGS    (void) 
  92. #define _HAS_PROTOTYPES
  93. #define _HAS_VOIDPTR
  94. #define _HAS_CONST
  95. #else 
  96. #define _EXTERN         extern
  97. #define _NULLARGS    () 
  98. #endif
  99.  
  100. #if defined(_HAS_PROTOTYPES) && !defined(lint)
  101. #define    _ARGS_(x)    x
  102. #else
  103. #define    _ARGS_(x)    ()
  104. #endif
  105.  
  106. #ifdef _HAS_CONST
  107. #define _CONST          const
  108. #else
  109. #define _CONST
  110. #endif
  111.  
  112. #ifdef _HAS_VOIDPTR
  113. typedef void *_VoidPtr;
  114. #else
  115. typedef char *_VoidPtr;
  116. #endif
  117.  
  118. #endif /* _ASM */
  119. #endif /* _CFUNCPROTO */
  120.  
  121. @
  122.  
  123.  
  124. 1.3
  125. log
  126. @Lint doesn't understand "const".
  127. @
  128. text
  129. @d17 1
  130. a17 1
  131.  * $Header: /r3/kupfer/spriteserver/include/user/RCS/cfuncproto.h,v 1.2 91/10/07 14:18:40 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  132. d48 1
  133. @
  134.  
  135.  
  136. 1.2
  137. log
  138. @Special-case the Sprite server the same way we special-case the kernel.
  139. @
  140. text
  141. @d17 1
  142. a17 1
  143.  * $Header: /r3/kupfer/spriteserver/include/user/RCS/cfuncproto.h,v 1.1 91/10/06 23:58:34 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  144. d44 4
  145. @
  146.  
  147.  
  148. 1.1
  149. log
  150. @Initial revision
  151. @
  152. text
  153. @d17 1
  154. a17 1
  155.  * $Header: /sprite/src/lib/include/RCS/cfuncproto.h,v 1.5 91/02/12 14:48:28 jhh Exp $ SPRITE (Berkeley)
  156. d36 1
  157. a36 1
  158.  * KERNEL with a standard C compiler.
  159. d41 1
  160. a41 1
  161. #if defined(KERNEL) && defined(__STDC__)
  162. @
  163.